//
//  ShadowContentView.swift
//  RPay
//
//  Created by CharlieLiao on 2017/7/8.
//  Copyright © 2017年 Charlie. All rights reserved.
//

import UIKit

@IBDesignable
class ShadowContentView: UIView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUpLayer()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        setUpLayer()
    }
    
    override func prepareForInterfaceBuilder() {
        super.prepareForInterfaceBuilder()
        setUpLayer()
    }
    
    private func setUpLayer()
    {
//       let shadow CALayer()
        
//        layer.masksToBounds = true
        layer.cornerRadius = 2
        layer.shadowColor = UIColor( hex: 0xD9D9D9).cgColor
        layer.shadowOffset = CGSize(width: 0, height: 3)
        layer.shadowOpacity = 0.6
    }
}
